﻿/**
 * Iterator
 *
 * @author		Allen Chou
 * @version		1.0.0 (last update: Dec 13 2008)
 * @link        http://cjcat.blogspot.com
 * @link		http://cjcat2266.deviantart.com
 */

package idv.cjcat.ds {
	
	/**
	 * The <code>Iterator</code> interface specifies standard operations of an iterator.
	 */
	public interface Iterator {
		
		/**
		 * Points the iterator to the first item.
		 */
		function begin():void;
		
		/**
		 * Points the iterator to the last item.
		 */
		function end():void;
		
		/**
		 * Points the iterator to the next item.
		 */
		function next():void;
		
		/**
		 * Points the iterator to the previous item.
		 */
		function prev():void;
		
		/**
		 * Determines whether the current item pointed by the iterator is the last one.
		 * @return True if the item is not the last one, otherwise false.
		 */
		function hasNext():Boolean;
		
		/**
		 * Determines whether the current item pointed by the iterator is the first one.
		 * @return True if the item is not the first one, otherwise false.
		 */
		function hasPrev():Boolean;
		
		/**
		 * The data the iterator is currently pointing to.
		 */
		function get data():*;
		
	}
	
}